package Day08;

class Person {
    private String name;
    public Person(String name){
        this.name = name;
    }
}

public class Print{
    public static void main(String[] args) {
        //创建一个Person对象，并赋给p变量
        Person p = new Person("孙悟空");
        System.out.println(p);
        System.out.println(p.toString());
        var pStr = p + "";
        var pstr = p.toString() + "";
    }
}
